LotusScript Doc

LotusScript library: LSALibJanitor

Options
Public
Declare

Uses
LSALibMsgH

Global variables
Public Const VIEWNAME = "LSASysAllByUNID"
Public DeleteFieldS = Variant
Public isJanitorActivated = Integer

The janitor cleans up a document when a document goes to disk. As there are often fields only for technical reasons like visibility in the WEB it would optimize space on disk but also create a much clearer data structure. As the fields may belong to various subforms the Janitor collects its requests from various subforms, and bundles them into one delete action. The Janitor.cleanUp is used in the WEBQuerySaveAgent when running for the web and in the QueryClose Event for the NotesClient. After all validations are sucessfully done and the document finally goes to disk call the cleanup routine. We can't call it in the QuerySave event, as this is also called for intermediate saves and we must not destroy the fields as they may be needed for further action. So we use the QueryClose and resave the document from there. If the user doesn't want to save the QuerySave is not executed and we have to suppress the Janitor.cleanup. Set the global variable isJanitorActivated to true at successful end of QuerySave .

Author:
LPS EMEA
Version:
2.1 13.SEP.2000
History:
13.Sep.200RGRmake Janitor usable in QueryClose
27.JUL.2000EScprevious Instancemanager functions copied


Method Summary
Sub CleanUp (Context As Variant)
Sub Initialize ()
Sub NoteFieldForDeletion (Arr As Variant)

Method Detail

NoteFieldForDeletion

Public Sub NoteFieldForDeletion(Arr As Variant)
Arr may be an array of strings or a String the fieldnames given in Arr are noted in a global array for later deletion the routine is usually called in a Postopen.

Parameters:
arrVariantof strings requesting the field names to be deleted
See also:
LSALibJanitor#CleanUp
History:
27.JUL.2000EScSame as function in previous Imgr ...
Summmary Top

CleanUp

Public Sub CleanUp(Context As Variant)
deletes all Fields that have been noted from the document. Usually called in QueryClose or the WebQuerySave agent Hint. Must not be called in QuerySave as this would destroy the fields if it is only saved intermediately. and document is not closed.

Parameters:
ContextVarianta notesDocument or a NotesUiDocument which gives the context
See also:
LSALibJanitor#NoteFieldForDeletion
History:
13.SEP.2000RGRin the case of a uidocument get the document from disk
27.JUL.2000EScrenamed and added flexibility for context
Summmary Top

Initialize

Public Sub Initialize
When the Janitor library is used, the default is that frondend documents aren't cleaned up. Set isJanitorActivated = True in the QuerySave Event when a document should be cleaned up in QueryClose. In QueryClose call the CleanUp routine.

Summmary Top

TopLotusScript Doc
© Lotus Professional Services
generated on : 05-Apr-01 10:01:44 AM